The present invention relates to a printer for executing print processing according to print data input from a host computer such as a personal computer and in particular to a printer to which print data is input from the host computer in synchronization with a synchronizing signal output from the printer to the host computer.
Some printers for executing print processing based on print data transmitted from a host computer adopt a two-way synchronous serial interface system wherein the printer supplies a synchronizing signal to the host computer and receives print data synchronized with the synchronizing signal from the host computer. The printer adopting such an interface system receives print data transmitted by a host computer at the same timing as a synchronizing signal supplied to the host computer, thereby performing print processing.
A first conventional printer adopting such an interface system samples print data transmitted by a host computer at the same timing as a synchronizing signal supplied to the host computer, thereby detecting print data. Specifically, the printer samples and detects a start bit placed at the top of data on the rising or falling edge of a synchronizing signal, thereby determining print data.
However, the first conventional printer cannot correctly detect print data if the channel between the printer and the host computer, for example, the length of a printer cable changes or the transmission speed becomes higher than the initial speed. Therefore, the first conventional printer may become unable to execute required print processing. That is, a delay on a channel such as the printer cable between the printer and the host computer or a transmission circuit of the host computer may cause the rising or falling timing of a synchronizing signal when the printer samples print data to differ from the rising or falling timing of a print data signal from the host computer. If the data transmission speed becomes high and the synchronizing signal frequency also becomes high, effect of the difference on the synchronizing signal width becomes larger relatively, thus the printer cannot detect a start bit in the print data.
A second conventional printer is a printer in a system wherein a host computer is connected to another computer and peripheral machines, for example, by a LAN (local area network). In the system, when the host computer outputs print data to the printer, it may change the data transmission speed to the printer because the host computer needs to perform any other processing at the same time.
In such a case, normally the host computer sends a change command for changing the clock rate of a synchronizing signal to the printer as data and the printer receiving the command changes the synchronizing signal to the corresponding clock rate.
However, generally the second conventional printer is adapted to once store the data transmitted from the host computer in a reception buffer memory and read the stored data in sequence for processing. Thus, if a data transmission speed change command as described above is transmitted, the change command is processed after the previously stored data is processed. Meanwhile, the host computer needs to stop transmitting data and stand by for a given time after transmitting the change command.
That is, a temporary wait occurs in the host computer because the host computer cannot send subsequent data until it becomes possible for the printer to receive data at new setup data transmission speed or until reception of a speed change complete notification from the printer. In this case, the host computer needs to be provided with a protocol for performing wait processing and the printer needs to be provided with a protocol for returning a speed change complete notification.
If the host computer is adapted to send data after the change command, the printer needs to be provided with a circuit capable of reliably receiving data after the data transmission speed is changed and the host computer needs also to be provided with a circuit capable of reliably transmitting data in such a case.
A third conventional printer is a printer for transmitting a status signal of a notifying a current state of the printer, such as printing, print completion, or no paper, to a host computer as required. In this case, the host computer notifies the host computer user of the current state of the printer. To communicate data between the printer and the host computer based on a synchronizing signal transmitted from the printer to the host computer as described above, a kind of the status signal is transmitted from the printer to the host computer in synchronization with the synchronizing signal.
Here, for example, if the host computer has a low data reception capability, namely, has a small input buffer or a low reception data processing capability, there is a fear of occurrence of incomplete or missing data in the host computer. In such a case, the third conventional printer adopts a technique of setting the transmission speed of data transferred between the host computer and the printer to low speed to such a degree that the host computer can process data.
The host computer transmits a data transmission speed change command to the printer, requesting the printer to lower the data transmission speed of the synchronizing signal output from the printer to such a degree that the host computer can process data, thereby temporarily changing the data transmission speed of the synchronizing signal output from the printer. In this case, the host computer receives a synchronizing signal at new setup data transmission speed from the printer, prepares for data reception at the speed, and upon completion of the preparation, transmits a completion signal (for example, Ready signal) to the printer, then receives data from the printer. After receiving the data from the printer, the host computer performs similar processing to change the data transmission speed to the former speed.
To perform data transmission speed change processing as described above, the host computer is provided with a protocol for performing such control and sends a predetermined command to the printer based on the protocol and a protocol corresponding thereto is also set in the printer.
However, in the third conventional printer, if the data transmission speed between the host computer and the printer is set low, as the data transmission speed from the host computer to the printer lowers, the time required for transmitting print data from the host computer is prolonged and it takes time until completion of print processing. To temporarily change the data transmission speed, the third conventional printer needs to perform complicated processing as described above; control becomes complicated and it takes extra time to execute processing.
It is therefore an object of the present invention to provide a printer that can correctly detect print data from a host computer even if data transmission speed becomes high or a channel becomes long.
It is another object of the present invention to provide a printer that can change data transmission speed easily.
It is still another object of the present invention to provide a printer that can reliably transmit necessary data to the host computer even if the host computer has a low data processing capability.
Other objects of the present invention will appear more fully from the following description.
According to one aspect of the present invention, there is provided a printer for transmitting a synchronizing signal to a host computer, using a sampling signal to detect print data from data transmitted from the host computer in synchronization with the synchronizing signal, and performing print processing based on the detected print data, characterized in that the sampling signal has a frequency higher than the synchronizing signal has.
According to another aspect of the present invention, there is provided a printer comprising an interface control section for communicating data between a host computer, a print processing execution section for performing print processing based on data received from the host computer through the interface control section, a synchronizing signal output section being placed in the interface control section for outputting a synchronizing signal to the host computer, a data reception section being placed in the interface control section for receiving data transmitted from the host computer at data transmission speed based on the synchronizing signal, a command detection section for detecting a change command for changing the clock rate of the synchronizing signal in the data received at the data reception section, and a control section being placed in the interface control section, when the command detection section detects the change command, the control section for giving a signal to the host computer for instructing the host computer to stop transmitting data and controlling the synchronizing signal output section so as to change the synchronizing signal to the clock rate specified in the change command, upon completion of changing the clock rate of the synchronizing signal, the control section for outputting a signal to the host computer for instructing the host computer to restart transmitting data.
According to still another aspect of the present invention, there is provided a printer comprising: an interface control section for communicating data between a host computer; a print processing execution section for performing print processing based on data received from the host computer via the interface control section; a timer section for counting a setup count value in sequence, a control section for outputting a data output command signal each time the expiration of the counting in the count section is reached; and a data transmission section for transmitting data of a predetermined length to the host computer upon reception of the data output command signal from the control section.